package factory;

import entity.CreditCard;
import entity.MasterCC;
/**
 * 弃用
 */
@Deprecated
public class MasterFactory implements CreditCardFactory{
    private static MasterFactory instance = null;
    private MasterFactory() {
    }
    public static MasterFactory getInstance() {
        if (instance == null) {
            instance = new MasterFactory();
        }
        return instance;
    }
    @Override
    public CreditCard createCard(String cardNumber, String holderName) {
        return new MasterCC()
               .setNumber(cardNumber)
               .setHolderName(holderName)
               .build();
    }
}
